<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<script type="text/javascript"> 
var Shop = {"set":{"path":"\/","buytarget":"3","dragcart":null,"refer_timeout":30},
            "url":{"addcart":"http:\/\/www.ruiyi.com\/?cart-ajaxadd.html",
                   "shipping":"http:\/\/www.ruiyi.com\/?cart-shipping.html",
                  "payment":"http:\/\/www.ruiyi.com\/?cart-payment.html",
                  "total":"http:\/\/www.ruiyi.com\/?cart-total.html",
                  "viewcart":"http:\/\/www.ruiyi.com\/?cart-view.html",
                  "ordertotal":"http:\/\/www.ruiyi.com\/?cart-total.html",
                  "applycoupon":"http:\/\/www.ruiyi.com\/?cart-applycoupon.html",
                  "diff":"http:\/\/www.ruiyi.com\/?product-diff.html"}};
</script>
<script type="text/javascript" src="${ctx }/js/safeai/tools.js"></script>
<script type="text/javascript" src="${ctx }/js/safeai/goodscupcake.js"></script>
<script>
/*
*foobar update:2009-9-8 13:46:55
*-----------------*/
window.addEvent('domready',function(){
       var barId ="982";
       var bar = $('foobar_'+barId);

       var barOptions = {
           MID:Cookie.get('S[MEMBER]'),
           uname:Cookie.get('S[UNAME]'),
           coin:[{"cur_code":"CNY","cur_name":"\u4eba\u6c11\u5e01","cur_sign":"\u00a5","cur_rate":"1.0000","def_cur":"true","disabled":"false"}],
           curCoin:Cookie.get('S[CUR]'),
           cartViewURl:'${ctx}/shopping/smallCart.do?method=getAllproducts',
           stick:false
       };
       if(barOptions.MID){$('uname_'+barId).setText(barOptions.uname);}
       /*if(barOptions.MID){
          $('loginBar_'+barId).hide();
         $('memberBar_'+barId).show();
          $('uname_'+barId).setText(barOptions.uname);
       }else{
          $('loginBar_'+barId).setStyle('visibility','visible');
       }*/

       if(coinBar=$('Cur_sel_'+barId)){
             
           var coinMenu = new Element('div',{'class':'coinmenu fmenu','styles':{'display':'none'}}).inject(document.body);
    
           barOptions.coin.each(function(item){
                
                if(item['cur_code']==barOptions['curCoin']){
                   coinBar.getElement('strong').set('text',[item.cur_sign,item.cur_name].join(''));
                }
                coinMenu.adopt(new Element('div',{'class':'item',text:[item.cur_sign,item.cur_name].join(''),events:{
                      
                      click:function(){
                          Cookie.set('S[CUR]',item.cur_code);
                          window.location.href=window.location.href;
                      }
                
                }}));
           });
           
            coinBar.addEvents({
                'mouseenter':function(){
                   coinMenu.setStyles({
                      top:coinBar.getPosition().y+coinBar.getSize().y,
                      left:coinBar.getPosition().x,
                      display:'block',
                      visibility:'visible'
                   });
                }
            });
            new QMenu(coinBar,coinMenu);
            
       }
       
       if(cartCountBar = $('Cart_'+barId)){
         var iTotal = '${SHOPPING_PRODUCT_TOTAL}';
         if(iTotal == ''){
         	iTotal = 0;
         }
         cartCountBar.setText(iTotal);
            var cartViewMenu =  new Element('div',{'class':'cartviewmenu fmenu','styles':{'display':'none'}}).inject(document.body);
            cartCountBar.addEvents({
                 'mouseenter':function(){
                   cartViewMenu.setStyles({
                      top:bar.getPosition().y+bar.getSize().y,
                      left:bar.getPosition().x,
                      width:419,
                      display:'block',
                      visibility:'visible'
                   }).set('html','<div class="note">正在加载购物车信息...</div>');
                    this.retrieve('request',{cancel:$empty}).cancel();
                    this.store('request',new Request.HTML({update:cartViewMenu}).get(barOptions.cartViewURl));
                }
            });
             new QMenu(cartCountBar,cartViewMenu);
            
      }

});
</script>
<script> 
 
/*
迷你购物车
@author litie[aita]shopex.cn
  [c] shopex.cn  
*/
 window.addEvent('domready',function(){
     var miniCart={
           'show':function(target){
               var dialog  = this.dialog =$pick($('mini-cart-dialog'),new Element('div',{'class':'dialog mini-cart-dialog','id':'mini-cart-dialog'}).setStyles({width:300}).inject(document.body));
                this.dialog.setStyles({
                         top:target.getPosition().y+target.getSize().y,
                         left:target.getPosition().x
                    }).set('html',
                  
                  $E('#template-modal .dialog').get('html').substitute({
                      
                      title:'正在加入购物车',
                      content:'正在加入购物车...'
                  })
                  
               ).show();
               
               
               
               document.addEvent('click',function(){
                  dialog.remove();
                  document.removeEvent('click',arguments.callee);
               });
           
           },
           'load':function(){
              var params=Array.flatten(arguments).link({
                  'remoteURL':String.type,
                  'options':Object.type
              });
              params.options.data = params.options.data?params.options.data.toQueryString()+'&mini_cart=true':'&mini_cart=true';
              var opts=params=$extend({
                 url:params.remoteURL,
                 method:'post',
                 onRequest:function(){
                     this.dialog.getElement('.title').set('html','正在加入购物车');
                    
                 }.bind(this),
                 onSuccess:function(re){
                     this.dialog.getElement('.title').set('html','<img src="${ctx}/images/safeai/viewimg/icon-success.gif" />成功加入购物车');
                     this.dialog.getElement('.dialog-content').set('html',re);
                     var iTotal = '${SHOPPING_PRODUCT_TOTAL}';
			         if(iTotal == ''){
			         	iTotal = 0;
			         }
                     $$('.cart-number').set('text',iTotal);
                    
                 }.bind(this),
                 onFailure:function(xhr){
                     this.dialog.remove();
                     MessageBox.error("加入购物车失败.<br /><ul><li>可能库存不足.</li><li>或提交信息不完整.</li></ul>");
                 }.bind(this)
              },params.options||{});
              if(!params.url)return false;
              miniCart.show(opts.target);
              new Request(opts).send();
           }
     };
     
        
 
   if(formtocart=$E('form[target=_dialog_minicart]')){
       formtocart.addEvent('submit',function(e){
           var productid = document.getElementById('goods[id]').value;
			var productNumber = document.getElementById('goodsNumInput').value;
        
           e.stop();
           miniCart.load([{
               url:"${ctx}/shopping/viewShoppingCart.do?m=xmlajax&id="+productid+"&isNeedPaper=" + 0+"&number="+productNumber,
               method:"xmlajax",
               data:this,
               target:this.getElement('input[value=加入购物车]')
           }]);
       
       });
   };
   /*for  goods which has specs*/
   if(btnbuy=$E('#goods-viewer form[target=_dialog_minicart] .btn-buy')){
      
      btnbuy.removeEvents('click').addEvent('click',function(e){
          e.stop();
          if(this.retrieve('tip:text'))return false;
          this.blur();
          this.form.fireEvent('submit',e);
      
      });
   
   };
   
   if(linktocart=$$('a[target=_dialog_minicart]')){
       if(linktocart.length){
            linktocart.addEvent('click',function(e){
            	var strFreeProductNumbId = 'free_goods_numb_'+this.type;
            	var strFreeProductGoods = this.type;
            	var iNumber = document.getElementById(strFreeProductNumbId).value;
            	iNumber = parseInt(iNumber);
                 e.stop();
                 miniCart.load([{
	               url:"${ctx}/shopping/viewShoppingCart.do?m=xmlajax&id="+strFreeProductGoods+"&isNeedPaper=" + 0+"&number="+iNumber,
	               method:"xmlajax",
	               data:this,
	               target:this}]);
            });
         
       }
   };
});
</script>
<DIV id=doc>
	<DIV id=ftw sizcache="9">
		<DIV id=ft sizcache="9">
			<P class=contact>
				<A href="/feedback/suggest.php">意见反馈</A>
			</P>
		</DIV>
		<DIV
			style="TEXT-ALIGN: center; PADDING-BOTTOM: 10px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 10px">
			<IMG src="http://www.rayi.cn//images/20110727/zhengpin.jpg">
			&nbsp;&nbsp;
			<IMG src="http://www.rayi.cn//images/20110727/7day.jpg">
			&nbsp;&nbsp;
			<IMG src="http://www.rayi.cn//images/20110727/15day.jpg">
			&nbsp;&nbsp;
			<IMG src="http://www.rayi.cn//images/20110727/clear.jpg">
			&nbsp;&nbsp;
			<IMG src="http://www.rayi.cn//images/20110727/ketang.jpg">
		</DIV>
		<DIV class=bottom_nav align=center>
			<A href="http://www.rayi.cn//?page-about.html">关于我们</A> &nbsp;|
			<A href="http://www.rayi.cn//?page-contact.html">联系我们</A> |
			<A
				href="http://www.rayi.cn//?page-%E5%8F%8B%E6%83%85%E9%93%BE%E6%8E%A51.html">友情链接</A>&nbsp;|&nbsp;
			<A href="http://www.rayi.cn/?page-zhaopin.html">诚聘英才</A>
		</DIV>
		<DIV class=bottom_nav align=center>
			销售服务热线：4006-987-666│ 京ICP备16866888号 │东南亚李小果集团 版权所有
		</DIV>
	</DIV>
</DIV>